package com.ecco.persistent;

import java.util.List;

import javax.ejb.Remote;

@Remote
public interface ColourAgentRemote {
	//life cycle method
	public void save(Colour persistentInstance);
	//life cycle method
	public void delete(Colour persistentInstance);
	//life cycle method
	public Colour update(Colour detachedInstance);

	//return all Colour records by col_name as a List<Colour>
	public List<Colour> findByColName(String col_name);
	//return all Colour records search by some part of col_name as a List<Colour>
	public List<Colour> searchByColName(String col_name);
	//return all Colour records by avail as a List<Colour>
	public List<Colour> findByAvail(String avail);

	//return all Colour records by col_id as a Colour class
	public Colour findColourById(Integer col_id);
	//return all Colour records as a list<Colour> 
	public List<Colour> findAll();
	
	//life cycle method(save)
	public void addColour(String col_name, String avail);
	//life cycle method(update)
	public void updateColour(Integer col_id, String col_name, String avail);
	//life cycle method(delete)
	public void removeColourById(Integer col_id);
	
	//return number of AOC Records find by col_id as a number
	public Integer findNumOfAOCRecordsByCol_id(Integer col_id);
	//check exist col_name return a boolean
	public Boolean checkByColName(String col_name);
	
}

